#ifndef _GEO_VERMANAGER_H_
#define _GEO_VERMANAGER_H_

#include "GeometryBase.h"

typedef list<CVertex>::iterator CVertexIter;

class CLineManager;
class CSurfaceManager;
class CSketchModel;

class CVertexManager
{
	friend class CLineManager;
	friend class CSurfaceManager;
	friend class CSketchModel;
public:
	CVertexManager(CLineManager* pLManager);
	~CVertexManager();

	CVertex* FindVertex(CVertex v);
	CVertex* FindKnot(CVertex v);
	CVertex* FindNearest2DVertex(CVertex2D v2D);
	CVertex* FindNearest3DVertex(CVertex3D v3D);
	bool AddVertex(CVertex v);
	bool DeleteVertex(CVertex v);

	void AddVertexFromHead(CVertex v);
	bool DeleteVertexFromHead();

	bool AddKnot(CVertex v);
	bool DeleteKnot(CVertex v);
	int GetVertexCount();
	int GetVertexCountWithoutInfPoint();
	CVertex* GetVertex(int index);
	int GetKnotCount();
	CVertex* GetKnot(int index);

protected:
private:
	list<CVertex> m_lVertex;
	list<CVertex> m_lKnots;
	CLineManager* m_pLManager;
};


#endif